package com.yanqu.road.entity.activity.auto.reward;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.entity.DataStatus;

import java.math.BigInteger;

/**
 * @Author wpj
 * @Date 2020/8/27
 */
@FieldTypeAnnotation(tableName = "t_u_every_day_charge_reward", desc = "每日充值自动发奖记录")
public class UserEveryDayChargeReward extends DataObject {
    @FieldTypeAnnotation(update = true, desc = "活动id")
    int activityId;
    @FieldTypeAnnotation(update = true, desc = "用户id")
    long userId;
    @FieldTypeAnnotation(update = true, desc = "条件id")
    int conditionId;
    @FieldTypeAnnotation(update = true, desc = "时间")
    int timeMark;
    @FieldTypeAnnotation(desc = "值")
    BigInteger value = BigInteger.ZERO;
    @FieldTypeAnnotation(select = true, desc = "领奖状态")
    boolean reward;

    public void setActivityId(int activityId) {
        if (this.activityId != activityId) {
            this.activityId = activityId;
            setOp(DataStatus.Update);
        }

    }

    public void setUserId(long userId) {
        if (this.userId != userId) {
            this.userId = userId;
            setOp(DataStatus.Update);
        }

    }

    public void setConditionId(int conditionId) {
        if (this.conditionId != conditionId) {
            this.conditionId = conditionId;
            setOp(DataStatus.Update);
        }

    }

    public void setTimeMark(int timeMark) {
        if (this.timeMark != timeMark) {
            this.timeMark = timeMark;
            setOp(DataStatus.Update);
        }

    }

    public void setValue(BigInteger value) {
        if (null == value) {
            return;
        }
        if (!this.value.equals(value)) {
            this.value = value;
            setOp(DataStatus.Update);
        }
    }

    public void setReward(boolean reward) {
        if (this.reward != reward) {
            this.reward = reward;
            setOp(DataStatus.Update);
        }

    }

    public int getActivityId() {
        return activityId;
    }

    public long getUserId() {
        return userId;
    }

    public int getConditionId() {
        return conditionId;
    }

    public int getTimeMark() {
        return timeMark;
    }

    public BigInteger getValue() {
        return value;
    }

    public boolean isReward() {
        return reward;
    }


    public String rewardStr;
    public String title;
    public String content;

    public String getRewardStr() {
        return rewardStr;
    }

    public void setRewardStr(String rewardStr) {
        this.rewardStr = rewardStr;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }
}
